﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WMSmanagement.IBaseService.PurchasingManagement.Dto
{
    public class AddProcurementDto
    {
        /// <summary>
        /// 采购单号
        /// </summary>
        [StringLength(40)]
        public string ProcurementCode { get; set; }
        /// <summary>
        /// 单据类型
        /// </summary>
        [StringLength(10)]
        public string DocumentType { get; set; }
        /// <summary>
        /// 供应商编号
        /// </summary>
        [StringLength(40)]
        public string? SupplierCode { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>
        [StringLength(30)]
        public string SupplierName { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 关联销售单号
        /// </summary>
        [StringLength(40)]
        public string SaleCode { get; set; }
        /// <summary>
        /// 收货日
        /// </summary>
        public DateTime ReceivingDate { get; set; }
        /// <summary>
        /// 客户名称
        /// </summary>
        [StringLength(10)]
        public string ClientName { get; set; }
        /// <summary>
        /// 联系人
        /// </summary>
        [StringLength(20)]
        public string Contact { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        [StringLength(20)]
        public string Phone { get; set; }
        /// <summary>
        /// 采购员
        /// </summary>
        [StringLength(10)]
        public string? Buyer { get; set; }
        /// <summary>
        /// 采购时间
        /// </summary>
        public DateTime? ProcurementDate { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [StringLength(10)]
        public string? State { get; set; }
        /// <summary>
        /// 是否入账
        /// </summary>
        public bool? IsEntry { get; set; }
        /// <summary>
        /// 退货
        /// </summary>
        [StringLength(10)]
        public string? ReturnGood { get; set; }
        public List<Purchasedetails> purchasedetails { get; set; }
    }
    public class Purchasedetails
    {
        public string Ids { get; set; }
        public int Nums { get; set; }
    }
    public class UpdateProcurementDto
    {
        public int Id { get; set; }
        /// <summary>
        /// 采购单号
        /// </summary>
        [StringLength(40)]
        public string ProcurementCode { get; set; }
        /// <summary>
        /// 单据类型
        /// </summary>
        [StringLength(10)]
        public string DocumentType { get; set; }
        /// <summary>
        /// 供应商编号
        /// </summary>
        [StringLength(40)]
        public string? SupplierCode { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>
        [StringLength(30)]
        public string SupplierName { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 关联销售单号
        /// </summary>
        [StringLength(40)]
        public string SaleCode { get; set; }
        /// <summary>
        /// 收货日
        /// </summary>
        public DateTime ReceivingDate { get; set; }
        /// <summary>
        /// 客户名称
        /// </summary>
        [StringLength(10)]
        public string ClientName { get; set; }
        /// <summary>
        /// 联系人
        /// </summary>
        [StringLength(20)]
        public string Contact { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        [StringLength(20)]
        public string Phone { get; set; }
        /// <summary>
        /// 采购员
        /// </summary>
        [StringLength(10)]
        public string? Buyer { get; set; }
        /// <summary>
        /// 采购时间
        /// </summary>
        public DateTime? ProcurementDate { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [StringLength(10)]
        public string? State { get; set; }
        /// <summary>
        /// 是否入账
        /// </summary>
        public bool? IsEntry { get; set; }
        /// <summary>
        /// 退货
        /// </summary>
        [StringLength(10)]
        public string? ReturnGood { get; set; }
        public List<Purchasedetails> purchasedetails { get; set; }
    }
}
